﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using FTchina;
using System.IO;

namespace smsupdate
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            Do();
              Process.Start("Cassini-v35.exe");
             base.Close();
        }

        protected void Do()
        {
            try
            {

                //每天备份一个新的
                string filepath = Application.StartupPath.ToLower() + "\\app_data\\";
                string theold = filepath + "db.db";
                string thenew = filepath + DateTime.Now.ToString("yyyyMMdd") + "db.back";

                System.IO.File.Copy(theold, thenew, true);




                string sql = "update serverinfo set ServerUrl='www.laihuabao.com:8081'";
                shujuku.ExecuteSql(sql);

            }
            catch(SystemException er)
            {

            }
        }
    }
}
